﻿namespace Steamworks
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct HTTPCookieContainerHandle : IEquatable<HTTPCookieContainerHandle>, IComparable<HTTPCookieContainerHandle>
    {
        public static readonly HTTPCookieContainerHandle Invalid;
        public uint m_HTTPCookieContainerHandle;
        public HTTPCookieContainerHandle(uint value)
        {
            this.m_HTTPCookieContainerHandle = value;
        }

        static HTTPCookieContainerHandle()
        {
            Invalid = new HTTPCookieContainerHandle(0);
        }

        public override string ToString()
        {
            return this.m_HTTPCookieContainerHandle.ToString();
        }

        public override bool Equals(object other)
        {
            return ((other is HTTPCookieContainerHandle) && (this == ((HTTPCookieContainerHandle) other)));
        }

        public override int GetHashCode()
        {
            return this.m_HTTPCookieContainerHandle.GetHashCode();
        }

        public bool Equals(HTTPCookieContainerHandle other)
        {
            return (this.m_HTTPCookieContainerHandle == other.m_HTTPCookieContainerHandle);
        }

        public int CompareTo(HTTPCookieContainerHandle other)
        {
            return this.m_HTTPCookieContainerHandle.CompareTo(other.m_HTTPCookieContainerHandle);
        }

        public static bool operator ==(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y)
        {
            return (x.m_HTTPCookieContainerHandle == y.m_HTTPCookieContainerHandle);
        }

        public static bool operator !=(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y)
        {
            return !(x == y);
        }

        public static explicit operator HTTPCookieContainerHandle(uint value)
        {
            return new HTTPCookieContainerHandle(value);
        }

        public static explicit operator uint(HTTPCookieContainerHandle that)
        {
            return that.m_HTTPCookieContainerHandle;
        }
    }
}

